﻿/* Copyright 2008 dnAnalytics Project.
 *
 * Contributors to this file:
 * Jurgen Van Gael
 *
 * This file is part of dnAnalytics.  dnAnalytics is licensed under the 
 * Microsoft Public License. See License.txt for a complete copy of the
 * license.
 */

namespace dnAnalytics
{
    /// <summary>
    /// Sets parameters for the library.
    /// </summary>
    public static partial class Control
    {
        private static bool mCheckDistributionParameters = true;
        private static bool mUseThreadSafeRandomNumberGenerators = true;

        /// <summary>
        /// If CheckDistributionParameters is set to true, the constructors and static sample methods of 
        /// the distribution classes will validate each parameter by checking that it is valid.
        /// For the multivariate distributions this could involve an expensive matrix factorization.
        /// 
        /// The default setting of this property is true.
        /// </summary>
        public static bool CheckDistributionParameters
        {
            get { return mCheckDistributionParameters; }
            set { mCheckDistributionParameters = value; }
        }


        /// <summary>
        /// Gets or sets a value indicating whether to use thread safe random number generators (RNG).
        /// Thread safe RNG about two and half time slower than non-thread safe RNG. 
        /// </summary>
        /// <value>
        /// 	<c>true</c> to use thread safe random number generators ; otherwise, <c>false</c>.
        /// </value>
        public static bool ThreadSafeRandomNumberGenerators
        {
            get { return mUseThreadSafeRandomNumberGenerators; }
            set { mUseThreadSafeRandomNumberGenerators = value; }
        }
    }
}